home *** CD-ROM | disk | FTP | other *** search
-
- Kent,
-
- This is intended for anyone having access to procmail.
- Feel free to archive or ignore or whatever. :-)
-
- Sridhar.
- -------
- # Using Procmail to moderate a Usenet group.
- # .procmailrc
- # by Sridhar Venkataraman <sridhar@asuvax.eas.asu.edu>
- # for rec.food.veg.cooking.
- # Short guide to conditions in recipes...
- # c - continue
- # f - consider the pipe as filter
- # h - Feed the header to pipe.
- # A - depends on last successful recipe.
-
-
- # This recipe converts any mail submissions to the moderation address to appear
- # like posting submissions.
-
- :cf
- ^TOrfvc-mod@utcc.utoronto.ca
- | formail -I "To: rec-food-veg-cooking@uunet.uu.net" -a "Newsgroups: rec.food.veg.cooking"
-
- # The following recipe recognized the submissions which are sent by
- # the psuedo-user news. In this case, the complete posting appears
- # just after the header. Hence the header is chopped.
-
- :0cf
- * ^From:.*news@
- * ^TO.*rec-food-veg-cooking@
- | sed -n '2,/^Path:/\!p' | formail -a "To: rec-food-veg-cooking@"
-
-
- # This is the start of the recipe cluster that recognizes a submission
- # to rec.food.veg.cooking. Saves a copy in the folder rfvc.
-
- :c
- ^TOrec-food-veg-cooking@
- rfvc
-
- # Save the Newsgroups, Subject, From, Date in some variables.
-
- :Ach
- newsgroups=|formail -a "Newsgroups: rec.food.veg.cooking" \
- -x "Newsgroups:"
- :Ach
- subject=|formail -x "Subject:"
- :Ach
- date=|formail -x "Date:"
- :Ach
- from=|formail -x "From:"
- :Ach
- replyto=|formail -rtx "To:"
-
- # If the poster doesn't want autoreplies, he supplies a keyword of
- # ignore in the posting. The following recipe appends the poster's
- # address to the file $HOME/system/rfvc.
-
- :0 Ach:rfvc.lock
- * Keywords:.*ignore
- | (cat > /dev/null ; echo "$replyto" >> $HOME/system/rfvc)
-
- # If the poster doesn't appear in the above file, he/she gets an
- # autoreply. This way I have been able to fix several machines'
- # reply-able addresses. Also people don't wonder why they don't see
- # the posting immediately on moderated groups.
-
- :0 Ach:rfvc.lock
- * !?grep -i $replyto $HOME/system/rfvc
- | (formail -rt -I "Subject: Acknowledgement [l/m 94/03/02]" -i "Received:" \
- -I "From: rfvc submissions <rfvc-request@utcc.utoronto.ca>" ; \
- echo "From:\t\t$from\nDate:\t$date\nNewsgroups:\t$newsgroups\nSubject:\t$subject" ; \
- cat /usr/people/sridhar/misc/rfvc/rec )| $SENDMAIL -t -oi
-
- # Finally the unnecessary headers are ripped off and the bare
- # essentials (headers + body) are saved as a MH-style folder. Each
- # posting is saved as a file. You can peruse the postings, make any
- # changes if need be and use "inews -h < <file>" to post any file.
-
-
- :Acf
- | formail -I "Apparently-To:" -I "To:" -I "Date:" \
- -a "Newsgroups: rec.food.veg.cooking" \
- -I "Sender:"\
- -I "Path:"\
- -a "Organization: -" \
- -a "Archive-Name: " \
- -a "Followup-To: " \
- -I "Lines:" \
- -I "In-Reply-To:" \
- -I "Approved: sridhar@asuvax.eas.asu.edu" \
- -I "X-Newsreader:" \
- -I "Nntp-Posting-Host:" -I "Originator:" \
- -I "Received:" -I "Return-Path:" | tail +2
-
- :Ac
- $HOME/misc/rfvc/misc/.
-
- # Just to get a copy of headers for quick overview.
-
- :Ah
- /usr/mail/sridhar
-
- # In case of questions on procmail refer the appropriate manual pages.
- # In case of any specific questions on the above recipes, you can get
- # hold of me - Sridhar <sridhar@asuvax.eas.asu.edu>
-
-
-
-
-